import { useTokenStore } from '@/stores/token.js'
import request from '@/utils/request.js'//导入request.js请求工具
//文章分类列表查询
export const rulesListService = ()=>{
    // const tokenStore = useTokenStore();
    //在pinia中定义的响应式数据，都不需要.value可以直接使用
    // return request.get('/category',{headers:{'Authorization':tokenStore.token}})
    return request.get('/rules/selectlist')
}

//学生添加接口 参数是json
export const rulesAddService = (rulesData)=>{
    return request.post('/rules/add',rulesData)
}

//学生修改 参数是json
export const rulesUpdateService=(rulesData)=>{
    return request.put('/rules/updateru',rulesData)
}


//学生删除
export const rulesDeleteService=(rulesId)=>{
    return request.delete(`/rules/delete/${rulesId}`)
}